package com.hinnotek.amoeba.adapters.old

import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.hinnotek.amoeba.R
import com.hinnotek.amoeba.widget.NoTouchRecyclerView
import java.util.*

class PTCreateRelatedListAdapter :
    BaseQuickAdapter<String?, BaseViewHolder>(R.layout.item_pt_create_related_list) {
    private var adapter: PTCreateRelatedListItemAdapter? = null
    override fun convert(holder: BaseViewHolder, item: String?) {
        val stringList: MutableList<String> = ArrayList()
        for (i in 0..1) {
            stringList.add("1")
        }
        val rlv_pt_related_project =
            holder.getView<NoTouchRecyclerView>(R.id.rlv_pt_related_project)
        val manager = LinearLayoutManager(context)
        manager.orientation = RecyclerView.VERTICAL
        rlv_pt_related_project.layoutManager = manager
        rlv_pt_related_project.adapter =
            PTCreateRelatedListItemAdapter(R.layout.item_project_gridview).also { adapter = it }
        adapter!!.setList(stringList)
    }
}